//
//  GJResult.h
//  xmgjAppFront
//
//  Created by Zeki on 2020/7/8.
//  Copyright © 2020 guojutech. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GJResponse.h"
NS_ASSUME_NONNULL_BEGIN

@interface GJResult : NSObject
+ (instancetype)createInstance; // 默认值对象
+ (instancetype)instanceWithMessage:(NSString *)message;
+ (instancetype)instanceWithResponse:(GJResponse *)response;
+ (instancetype)instanceWithSuccess:(BOOL)success message:(NSString *)message successData:(id)successData;

/**
 *  是否成功
 */
@property (nonatomic, assign) BOOL isSuccess;
/**
 错误码
 */
@property (copy, nonatomic) NSString *code;
/**
 *  错误信息
 */
@property (nonatomic, copy) NSString *message;
/**
 *  成功处理的数据,可能是任意对象
 */
@property (nonatomic, strong) id successData;
@end

NS_ASSUME_NONNULL_END
